const  convertDateFormat =function (dateArray) {
    const months = [
        'January', 'February', 'March', 'April', 'May', 'June',
        'July', 'August', 'September', 'October', 'November', 'December'
    ];
    
    const days = [
        'Sunday', 'Monday', 'Tuesday', 'Wednesday', 
        'Thursday', 'Friday', 'Saturday'
    ];
    
    return dateArray.map(dateStr => {
        const date = new Date(dateStr);
        
        if (isNaN(date.getTime())) {
            throw new Error(`Invalid date: ${dateStr}`);
        }
        
        const month = months[date.getMonth()];
        const day = date.getDate().toString().padStart(2, '0');
        const dayOfWeek = days[date.getDay()];
        
        return {
			key:dateStr,
			value:`${month} ${day} (${dayOfWeek})`
		};
    });
}

export {
	convertDateFormat
}